home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / xa / NamespaceWindow.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  3.8 KB  |  98 lines

  1. package com.extensibility.xa;
  2.  
  3. import com.extensibility.rock.RAction;
  4. import com.extensibility.xml.BaseDeclaration;
  5. import com.extensibility.xml.NamespaceDeclaration;
  6. import java.awt.BorderLayout;
  7. import java.awt.Component;
  8. import java.awt.Container;
  9. import java.awt.Window;
  10. import javax.swing.JFrame;
  11. import javax.swing.JMenuBar;
  12. import javax.swing.JScrollPane;
  13. import javax.swing.JToolBar;
  14. import javax.swing.border.Border;
  15. import javax.swing.event.ListSelectionEvent;
  16. import javax.swing.event.ListSelectionListener;
  17.  
  18. public class NamespaceWindow extends SchemaWin implements ListSelectionListener {
  19.    NamespaceTable table;
  20.    JScrollPane tblPane;
  21.  
  22.    public NamespaceWindow(SchemaDoc var1) {
  23.       super(var1);
  24.       ((Component)this).setVisible(false);
  25.       ((JFrame)this).getContentPane().setLayout(new BorderLayout());
  26.       ((Component)this).setVisible(false);
  27.       this.table = new NamespaceTable(new NamespaceModel(((SchemaWin)this).getSchemaDoc()));
  28.       this.tblPane = new JScrollPane(this.table);
  29.       this.tblPane.setBorder((Border)null);
  30.       this.tblPane.setHorizontalScrollBarPolicy(31);
  31.       this.tblPane.setVerticalScrollBarPolicy(22);
  32.       this.tblPane.setCorner("UPPER_RIGHT_CORNER", this.table.createCorner());
  33.       ((JFrame)this).getContentPane().add(this.tblPane, "Center");
  34.       JToolBar var2 = ((SchemaWin)this).createToolBar();
  35.       if (var2 != null) {
  36.          ((JFrame)this).getContentPane().add(var2, "North");
  37.       }
  38.  
  39.       ((JFrame)this).setJMenuBar(this.createMenuBar());
  40.       ((Window)this).addWindowListener(new 1(this));
  41.    }
  42.  
  43.    public DeclTable getCurrentTable() {
  44.       return this.table;
  45.    }
  46.  
  47.    public String getClassName() {
  48.       return "com.extensibility.xa.NamespaceWindow";
  49.    }
  50.  
  51.    public void dispose() {
  52.       super.dispose();
  53.       ((Container)this).removeAll();
  54.    }
  55.  
  56.    public boolean select(BaseDeclaration var1) {
  57.       return this.table.select(var1);
  58.    }
  59.  
  60.    public boolean commitPendingEdits(boolean var1) {
  61.       return this.table.commitPendingEdits(var1);
  62.    }
  63.  
  64.    protected RAction createCutAction() {
  65.       return this.table.cutAction;
  66.    }
  67.  
  68.    protected RAction createCopyAction() {
  69.       return this.table.copyAction;
  70.    }
  71.  
  72.    protected RAction createPasteAction() {
  73.       return this.table.pasteAction;
  74.    }
  75.  
  76.    protected RAction createClearAction() {
  77.       return this.table.clearAction;
  78.    }
  79.  
  80.    protected RAction createExpandAction() {
  81.       return this.table.expandAction;
  82.    }
  83.  
  84.    protected JMenuBar createMenuBar() {
  85.       JMenuBar var1 = super.createMenuBar();
  86.       return var1;
  87.    }
  88.  
  89.    public void valueChanged(ListSelectionEvent var1) {
  90.       NamespaceDeclaration var2 = (NamespaceDeclaration)this.table.getSelectedDecl();
  91.       ((SchemaWin)this).declarationFocused(var2);
  92.    }
  93.  
  94.    public void selectDeclaration(BaseDeclaration var1) {
  95.       this.table.select(var1);
  96.    }
  97. }
  98.